#include "loadUtils.h"

int getFileInfo(FILE *ptr_file,int *maxlinelen){
	int numlines=0;
	*maxlinelen=0;
	int linelen=0;
	for(int i=getc(ptr_file);i!=EOF;i=getc(ptr_file)){
		linelen++;
		if(i=='\n'){
			if(linelen>=*maxlinelen){
				*maxlinelen=linelen+1;//+1 for some reason...
			}
			linelen=0;
			numlines++;
		}
	}
	rewind(ptr_file);
	return numlines;
}

int pow1(int base, int exp){
	int result=base;
	for(int i=1;i<exp;i++){
		result=result*base;
	}
	return result;
}